package com.xyy.saas.payment.util.xydSign;

import org.springframework.util.Assert;
import org.springframework.util.StringUtils;

/**
 * @author XYD
 * @description:
 * @createDate: 2021/10/9
 * @updateDate: 2021/10/9
 * @updateBy: XYD
 */
public class AssertUtils extends Assert {

    public static void isEmpty(String expression, String message) {
        Assert.isTrue(StringUtils.isEmpty(expression), message);
    }

    public static void isNotEmpty(String expression, String message) {
        Assert.isTrue(!StringUtils.isEmpty(expression), message);
    }

    public static void isBlank(String expression, String message) {
        Assert.isTrue(StringUtils.isEmpty(StringUtils.trimWhitespace(expression)), message);
    }

    public static void isNotBlank(String expression, String message) {
        Assert.isTrue(!StringUtils.isEmpty(StringUtils.trimWhitespace(expression)), message);
    }
}
